package com.lanou.mapper;

import com.lanou.bean.ModuleInfo;
import com.lanou.bean.RoleGuanLiBean;
import com.lanou.bean.RoleInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleInfoMapper {
    /**
     * 根据admininfo标的name查角色
     * @param name
     * @return
     */
    List<RoleInfo> selectRoles(@Param("name")String name);
    List<RoleInfo> findAllRoles();

    void addRole(RoleInfo roleInfo);

    void deleteRole(@Param("id") int id);

    RoleInfo selectRoleId(@Param("name") String name);

    void updateRole(@Param("newName")String newName, RoleInfo roleInfo);

    List<RoleGuanLiBean> selectadminInfo();

    List<ModuleInfo> selectModuleByAdminId(@Param("role_id") int role_id);

    //根据roleid去查询
    RoleGuanLiBean selectRoleInfoById(@Param("role_id") int role_id);

    //根据id修改
    void upDataRoleInfo (@Param("role_id") int roleId,@Param("name") String name);

    RoleInfo selectRoleByRoleName(@Param("name") String name);


}